<?php

use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;

class CreateServerListsTable extends Migration
{
    /**
     * Run the migrations. 服务器列表.
     */
    public function up()
    {
        Schema::create('server_lists', function (Blueprint $table) {
            $table->increments('id');
            $table->integer('server_id')->comment('服务器id')->unique();
            $table->integer('reg_id')->comment('大区id');
            $table->string('merge_tag', 100)->default(0)->comment('合服标识');
            $table->string('name')->comment('服务器名称');
            $table->smallInteger('status')->comment('状态');
            $table->string('ip')->nullable()->comment('ip');
            $table->integer('port')->comment('端口');
            $table->string('desc')->comment('描述');
            $table->tinyInteger('type')->default(1)->comment('类型1物理服，0逻辑服');
            $table->integer('sort')->default(99)->comment('排序值');
            $table->timestamp('deleted_at')->nullable()->comment('删除时间');
            $table->timestamps();
        });
    }

    /**
     * Reverse the migrations.
     */
    public function down()
    {
        Schema::dropIfExists('server_lists');
    }
}
